package com.wallet.gateway;

import com.wallet.gateway.filter.AccessTokenFilter;
import org.apache.catalina.filters.CorsFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;

@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
public class WalletGatewayApplication {

	public static void main(String[] args) {
		SpringApplication.run(WalletGatewayApplication.class, args);
	}

	// 配置过滤器
	@Bean
	public AccessTokenFilter accessTokenFilter() {
		return new AccessTokenFilter();
	}
}
